package com.example.administrator.activity.test.music;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.textservice.TextInfo;
import android.widget.ImageButton;
import android.widget.SeekBar;
import android.widget.TextView;

import com.example.administrator.activity.R;

public class Music2PlayActivity extends AppCompatActivity {
TextView title,Irc;
ImageButton play,pause,stop;
SeekBar seekBar;
TextView progress,total;
private Intent intent;
String mp3Name,sdPath;

    /**
     * 1.获取Intent传递的参数
     * 2.修改TextView内容：MP3文件名
     * 3.歌词内容的显示
     * 4.音乐的播放，暂停，继续，停止功能
     * 5.进度条的时间的显示
     * 6.进度条拖动事件
     * @param savedInstanceState
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_music2_play);
//        关联布局文件中的空间
        init();
        intent=this.getIntent();
        mp3Name=intent.getStringExtra("mpName");
        sdPath=intent.getStringExtra("sdPath");
        title.setText(mp3Name);

    }

    private void init() {
        title=findViewById(R.id.music2_tv_title);
        Irc=findViewById(R.id.music2_tv_lyric);
        progress=findViewById(R.id.music2_tv_progress);
        total=findViewById(R.id.music2_tv_total);
        play=findViewById(R.id.music2_btn_play);
        pause=findViewById(R.id.music2_btn_pause);
        stop=findViewById(R.id.music2_btn_stop);
        seekBar=findViewById(R.id.music2_seekbar);
    }
}
